﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Chat_D_LuX.Controls
{
    public partial class ucAccountEdit : UserControl
    {
        public ucAccountEdit()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            Control ctrl = this.Parent;//Getting tab page from current control            
            this.Dispose();//dispose of ucAccountEdit
            ctrl.Dispose();//dispose of tab
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            //TODO Save off changes to User and profile 

            //AFTER save is complete then run this code
            Control ctrl = this.Parent;//Getting tab page from current control            
            this.Dispose();//dispose of ucAccountEdit
            ctrl.Dispose();//dispose of tab
        }

    }
}
